//
//  YD_getLocationCell.m
//  SpeedDating
//
//  Created by isu on 17/3/18.
//  Copyright © 2017年 isu. All rights reserved.
//

#import "FriendgetLocationCell.h"

@implementation FriendgetLocationCell

+(instancetype)cellWithTableView:(UITableView*)tableView {
    static NSString *ID = @"FriendgetLocationCell";
    FriendgetLocationCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if(cell==nil){
        cell = [[FriendgetLocationCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID ];
        cell.backgroundColor =[UIColor whiteColor];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        self.lab = [UILabel new];
        self.lab.numberOfLines = 0;
        [self.contentView addSubview:self.lab];
        [self.lab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView).offset(20);
            make.top.mas_equalTo(10);
            make.right.mas_equalTo(self.contentView).offset(-20);
        }];
    }
    return self;
}

-(CGFloat)getHeight{
    [self layoutIfNeeded];
    CGFloat H = CGRectGetMaxY(self.lab.frame);
    return  H+10;
}
@end
